{% extends 'base.html' %}

{% block plug-js %}
<link rel="stylesheet" href="/static/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="/static/kindeditor/themes/simple/simple.css" />
<script charset="utf-8" src="/static/kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="/static/kindeditor/lang/zh-CN.js"></script>
<script>
    var editor;
    KindEditor.ready(function(K) {
            editor = K.create('#article-content', {
                    themeType : 'simple',
                    resizeType: 0
            });
    });
</script>
{% endblock %}


{% block page-container %}

    <div class="wrap-left">
        <div style="padding-left: 30px;">
            <span><h4>投稿</h4></span>
            <hr>
        </div>
        <div class="row">
            <form class="form-horizontal" enctype="multipart/form-data" id="frm_article" action="#" method="post">{% csrf_token %}
            {% for field in frm_atricle %}
              <div class="form-group">
                <label for="title" class="col-sm-2 control-label">{{ field.label }}</label>
                <div class="col-sm-10">
                  {{ field }}
                    <label class="alert-danger" hidden id="alert_{{ field.name }}"></label>
                </div>
              </div>
            {% endfor %}
          <div class="form-group" hidden >
            <div class="col-sm-offset-2 col-sm-10">
                 <input type="text" value="" id="status" name="status">
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <a class="btn btn-success" onclick="post_article('published');" >投稿</a>
                <!--a class="btn btn-default" onclick="post_article('draft');">保存</a-->
            </div>
          </div>
        </form>
        </div>
    </div>
        <!--  右侧栏 -->
    <div class="wrap-right">
      right contain
    </div>
    <div class="clear-both"></div>



{% endblock %}

{% block self-js %}
<script type="text/javascript" src="/static/bootstrap/js/artdetail.js"></script>

{% endblock %}